package ${config.basePackage}.service.impl;

import ${config.basePackage}.dao.${table.className}Dao;
import ${config.basePackage}.model.entity.${table.className}Entity;
import ${config.basePackage}.service.${table.className}Service;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

/**
 * ${table.comment} 服务实现类
 *
 * @author ${config.author}
 * @date ${.now?string("yyyy年MM月dd日 HH:mm:ss")}
 * @since JDK 17
 */
@Service
public class ${table.className}ServiceImpl implements ${table.className}Service {

    @Resource
    private ${table.className}Dao ${table.className?uncap_first}Dao;

    @Override
    public List<${table.className}Entity> listByConditions(Map<String, Object> map) {
        return ${table.className?uncap_first}Dao.listByConditions(map);
    }

    @Override
    public boolean save(${table.className}Entity entity) {
        return ${table.className?uncap_first}Dao.save(entity) > 0;
    }

    @Override
    public boolean update(${table.className}Entity entity) {
        return ${table.className?uncap_first}Dao.update(entity) > 0;
    }
}
